<?php
class Company_RestController extends Ac_Rest_Controller
{

    /**
        return one random listing
    */
    public function indexAction() {
           
    }

    /**
        return one specific listing
    */
    public function getAction() 
    {
        $id   = $this->_request->getParam('id');
        $ele  = Model_Company::one(array('_id' => new MongoId($id)));
        if (empty($ele)) {
            $this->getResponse()->setHttpResponseCode(403);
            throw new Ac_Exception_MissingInformation('Company not found');
        }

       
        $this->_helper->json($ele->exportRest());
    }


    function putAction()
    {
    }

}

